# -*- coding: utf-8 -*-
# @Time : 2022-06-22 10:51
# @Author : Z
# @Function : 将读取的文件内容处理成为列表
from Common.Logger import logger, path

case = []
# 打开文件
with open(path+r'\lib\userinfo.sql',mode='r',encoding='utf8') as f:
    # 遍历每一行的内容
    for line in f.readlines():
        # logger.info(line)
        # if line.startswith('DELETE'):
        #     # 换行被替换为空字符串
        #     line=line.replace('\n','').replace('DELETE','delete')
        #     # 添加到列表
        #     logger.info(line)
        # elif line.startswith('INSERT'):
        #     line=line.replace('\n','')
        #     case.append(line)
        # 去掉每行头尾空白
        line = line.strip()
        case.append(line)

logger.info(case)
logger.info('--------------------------------------------------------------------------------------')

for line in case:
    logger.info(line)
